const Router = require('koa-router');
const router = new Router();
router.get('/users', (ctx) => {
    ctx.body = '这里是用户列表'
});
router.post('/user', (ctx) => {
    ctx.body = {
      headers: ctx.request.header,
      params: ctx.params,
      query: ctx.request.query,
      body: ctx.request.body
    };
})

router.get("/user/:id", ctx => {
  ctx.body = ctx.params;
});
module.exports = router